<?php 

namespace pmvc\mvc;

use ArrayObject;


class Model 
	extends ArrayObject {

	public function __construct(Array $model=Array()) {
		parent::__construct($model);
	}
	
	public function merge(Array $array) {
		foreach ($array as $key => $value) {
			$this[$key] = $value;
		}
	}

	public function set($name, $value) {
		$this[$name] = $value;
	}

	public function get($name, $default=NULL) {
		return array_key_exists($name, $this) ? $this[$name] : $default;
	}
}

?>